﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace ZhimeiSoft.CharmManager.DOL
{
    /// <summary>
    /// 提醒表
    /// </summary>
    [Serializable()]
    public class DBEntitySchedule : DBEntityBase
    {
        public DBEntitySchedule()
            : base()
        {
        }
        public DBEntitySchedule(DataRow drScheduleInfo)
            : base()
        {
             this.SCHEDUEID = Convert.ToInt32(drScheduleInfo[FieldName.SCHEDUEID]);
             this.SALONID = Convert.ToInt32(drScheduleInfo[FieldName.SALONID]);
             this.SCHEDULENAME = drScheduleInfo[FieldName.SCHEDULENAME].ToString();
             this.SCHEDULETIME = Convert.ToDateTime(drScheduleInfo[FieldName.SCHEDULETIME]);
             this.SYSTIME = Convert.ToDateTime(drScheduleInfo[FieldName.SYSTIME]);
             this.STATE = drScheduleInfo[FieldName.STATE].ToString();
             this.SPLANSTARTTIME = Convert.ToDateTime(drScheduleInfo[FieldName.SPLANSTARTTIME]);
             this.SPLANENDTIME = Convert.ToDateTime(drScheduleInfo[FieldName.SPLANENDTIME]);
             this.SPLANTIMESTATE = drScheduleInfo[FieldName.SPLANTIMESTATE].ToString();
             this.SPLANMEMO = drScheduleInfo[FieldName.SPLANMEMO].ToString();
             this.SCHEDULETYPE = drScheduleInfo[FieldName.SCHEDULETYPE].ToString();
             this.SPLANEMPLOYEE = drScheduleInfo[FieldName.SPLANEMPLOYEE].ToString();
        }
        /// <summary>
        /// 表名称
        /// </summary>
        /// <returns></returns>
        public override string GetTableName()
        {
            return base.GetTableName();
        }
        /// <summary>
        /// 提醒ID
        /// </summary>
        public int SCHEDUEID { get; set; }
        /// <summary>
        /// 店ID
        /// </summary>
        public int SALONID { get; set; }
        /// <summary>
        /// 计划名称
        /// </summary>
        public string SCHEDULENAME { get; set; }
        /// <summary>
        /// 提醒开始时间
        /// </summary>
        public DateTime SCHEDULETIME { get; set; }
        /// <summary>
        /// 系统完成时间 如果提醒完成（SOF）系统自动记录当前时间
        /// </summary>
        public DateTime SYSTIME { get; set; }
        /// <summary>
        /// 提醒状态 S0P 提醒进行中 S0F提醒完成 SOE 提醒过期 SON 不提醒
        /// </summary>
        public string STATE { get; set; }
        /// <summary>
        /// 提醒计划开始时间
        /// </summary>
        public DateTime SPLANSTARTTIME { get; set; }
        /// <summary>
        /// 提醒计划结束时间
        /// </summary>
        public DateTime SPLANENDTIME { get; set; }
        /// <summary>
        /// 提醒类型该类型只能在SOP 状态有效，SH每小时提醒 SD 每天提醒 SW 每周提醒 
        /// SM 每月提醒 SDH 定时提醒，下次提醒的时间存放在ScheduleTime
        /// </summary>
        public string SPLANTIMESTATE { get; set; }
        /// <summary>
        /// 备注说明
        /// </summary>
        public string SPLANMEMO { get; set; }
        /// <summary>
        /// 提醒类别 SC 会员提醒 SS 系统提醒 
        /// </summary>
        public string SCHEDULETYPE { get; set; }
        /// <summary>
        /// 计划创建人
        /// </summary>
        public string SPLANEMPLOYEE { get; set; }
        /// <summary>
        /// 字段名
        /// </summary>
        public static class FieldName
        {
            /// <summary>
            /// 提醒ID
            /// </summary>
            public const string SCHEDUEID = "SCHEDUEID";
            /// <summary>
            /// 店ID
            /// </summary>
            public const string SALONID = "SALONID";
            /// <summary>
            /// 计划名称
            /// </summary>
            public const string SCHEDULENAME = "SCHEDULENAME";
            /// <summary>
            /// 提醒开始时间
            /// </summary>
            public const string SCHEDULETIME = "SCHEDULETIME";
            /// <summary>
            /// 系统完成时间 如果提醒完成（SOF）系统自动记录当前时间
            /// </summary>
            public const string SYSTIME = "SYSTIME";
            /// <summary>
            /// 提醒状态 S0P 提醒计划中 S0F 提醒完成 SOE 提醒超时
            /// </summary>
            public const string STATE = "STATE";
            /// <summary>
            /// 提醒计划开始时间
            /// </summary>
            public const string SPLANSTARTTIME = "SPLANSTARTTIME";
            /// <summary>
            /// 提醒计划结束时间
            /// </summary>
            public const string SPLANENDTIME = "SPLANENDTIME";
            /// <summary>
            /// 提醒类型该类型只能在SOP 状态有效，SH每小时提醒 SD 每天提醒 SW 每周提醒 
            /// SM 每月提醒 SDH 定时提醒，下次提醒的时间存放在ScheduleTime
            /// </summary>
            public const string SPLANTIMESTATE = "SPLANTIMESTATE";
            /// <summary>
            /// 备注说明
            /// </summary>
            public const string SPLANMEMO = "SPLANMEMO";
            /// <summary>
            /// 类型SC 会员提醒 SS 系统提醒 SE 员工提醒
            /// </summary>
            public const string SCHEDULETYPE = "SCHEDULETYPE";
            /// <summary>
            /// 类型SC 会员提醒 SS 系统提醒 
            /// </summary>
            public const string SPLANEMPLOYEE = "SPLANEMPLOYEE";

        }
        /// <summary>
        ///提醒状态 S0P 提醒计划中 S0F 提醒完成 SOE 提醒超时
        /// </summary>
        public static class ENUM_STATE
        {
             
            /// <summary>
            /// S0P 提醒进行中
            /// </summary>
            public const string SOP = "SOP";
            /// <summary>
            /// S0F 提醒完成
            /// </summary>
            public const string SOF = "SOF";
            /// <summary>
            /// SOE 提醒过期
            /// </summary>
            public const string SOE = "SOE";
            /// <summary>
            /// SNO 不提醒
            /// </summary>
            public const string SON = "SON";

            /// <summary>
            /// S0P 提醒进行中
            /// </summary>
            public const string SOP_CHINESE = "提醒进行中";
            /// <summary>
            ///  S0F 提醒完成
            /// </summary>
            public const string SOF_CHINESE = "提醒完成";
            /// <summary>
            /// SOE 提醒过期
            /// </summary>
            public const string SOE_CHINESE = "提醒过期";
            /// <summary>
            /// SNO 不提醒
            /// </summary>
            public const string SON_CHINESE = "不提醒";

            /// <summary>
            /// 根据枚举值返回中文
            /// </summary>
            /// <param name="cState">枚举值</param>
            /// <returns>返回中文</returns>
            public static string EnumStrToChineseStr(string cState)
            {
                string[] serchStr = new string[] { SOP, SOF, SOE, SON };
                string[] sReturnStr = new string[] { SOP_CHINESE, SOF_CHINESE, SOE_CHINESE, SON_CHINESE };
                return DBEntityBase.GetStrReturnStr(cState, serchStr, sReturnStr);
            }
            /// <summary>
            /// 根据中文返回枚举值
            /// </summary>
            /// <param name="chineseStr">中文</param>
            /// <returns>返回枚举字符串</returns>
            public static string ChineseStrToEnumStr(string chineseStr)
            {
                string[] serchStr = new string[] { SOP_CHINESE, SOF_CHINESE, SOE_CHINESE, SON_CHINESE };
                string[] sReturnStr = new string[] { SOP, SOF, SOE, SON };
                return DBEntityBase.GetStrReturnStr(chineseStr, serchStr, sReturnStr);
            }

        };

        /// <summary>
        /// 提醒类型该类型只能在SOP 状态有效，SH每小时提醒 SD 每天提醒 SW 每周提醒 
        /// SM 每月提醒 SDH 定时提醒，下次提醒的时间存放在ScheduleTime
        /// </summary>
        public static class ENUM_SPLANTIMESTATE
        {
            /// <summary>
            /// SH每小时提醒
            /// </summary>
            public const string SH = "SH";
            /// <summary>
            /// SD 每天提醒
            /// </summary>
            public const string SD = "SD";
            /// <summary>
            /// SW 每周提醒
            /// </summary>
            public const string SW = "SW";
            /// <summary>
            /// SM 每月提醒
            /// </summary>
            public const string SM = "SM";
            /// <summary>
            /// SDH 定时提醒
            /// </summary>
            public const string SDH = "SDH";

            /// <summary>
            /// SH每小时提醒
            /// </summary>
            public const string SH_CHINESE = "每小时提醒";
            /// <summary>
            /// SD 每天提醒
            /// </summary>
            public const string SD_CHINESE = "每天提醒";
            /// <summary>
            /// SW 每周提醒
            /// </summary>
            public const string SW_CHINESE = "每周提醒";
            /// <summary>
            /// SM 每月提醒
            /// </summary>
            public const string SM_CHINESE = "每月提醒";
            /// <summary>
            /// SDH 定时提醒
            /// </summary>
            public const string SDH_CHINESE = "定时提醒";

            /// <summary>
            /// 根据枚举值返回中文
            /// </summary>
            /// <param name="cState">枚举值</param>
            /// <returns>返回中文</returns>
            public static string EnumStrToChineseStr(string cState)
            {
                string[] serchStr = new string[] {SH, SD, SW, SM, SDH};
                string[] sReturnStr = new string[] { SH_CHINESE, SD_CHINESE, SW_CHINESE, SM_CHINESE, SDH_CHINESE};
                return DBEntityBase.GetStrReturnStr(cState, serchStr, sReturnStr);
            }
            /// <summary>
            /// 根据中文返回枚举值
            /// </summary>
            /// <param name="chineseStr">中文</param>
            /// <returns>返回枚举字符串</returns>
            public static string ChineseStrToEnumStr(string chineseStr)
            {
                string[] serchStr = new string[] { SH_CHINESE, SD_CHINESE, SW_CHINESE, SM_CHINESE, SDH_CHINESE};
                string[] sReturnStr = new string[] { SH, SD, SW, SM, SDH };
                return DBEntityBase.GetStrReturnStr(chineseStr, serchStr, sReturnStr);
            }
        }
        /// <summary>
        /// 提醒类型SC 会员提醒 SS 系统提醒 
        /// </summary>
        public static class ENUM_SCHEDULETYPE
        {
            /// <summary>
            /// SC 会员提醒 
            /// </summary>
            public const string SC = "SC";
            /// <summary>
            /// SS 系统提醒
            /// </summary>
            public const string SS = "SS";
            /// <summary>
            /// SE 员工提醒
            /// </summary>
            public const string SE = "SE";
            /// <summary>
            /// SC 会员提醒 
            /// </summary>
            public const string SC_CHINESE = "会员提醒";
            /// <summary>
            /// SS 系统提醒
            /// </summary>
            public const string SS_CHINESE = "系统提醒";
            /// <summary>
            /// SE 员工提醒
            /// </summary>
            public const string SE_CHINESE = "员工提醒";

            /// <summary>
            /// 根据枚举值返回中文
            /// </summary>
            /// <param name="cState">枚举值</param>
            /// <returns>返回中文</returns>
            public static string EnumStrToChineseStr(string cState)
            {
                string[] serchStr = new string[] { SC, SS, SE };
                string[] sReturnStr = new string[] { SC_CHINESE, SS_CHINESE, SE_CHINESE };
                return DBEntityBase.GetStrReturnStr(cState, serchStr, sReturnStr);
            }
            /// <summary>
            /// 根据中文返回枚举值
            /// </summary>
            /// <param name="chineseStr">中文</param>
            /// <returns>返回枚举字符串</returns>
            public static string ChineseStrToEnumStr(string chineseStr)
            {
                string[] serchStr = new string[] { SC_CHINESE, SS_CHINESE, SE_CHINESE };
                string[] sReturnStr = new string[] { SC, SS, SE };
                return DBEntityBase.GetStrReturnStr(chineseStr, serchStr, sReturnStr);
            }
        }
    }
    
  }
